Crate iyes_perf_ui
source ·Expand description
Customizable Performance/Debug Overlay for Bevy UI
This crate provides an implementation of an in-game performance/debug UI overlay for the Bevy game engine.
The goal of this crate is to make it as useful as possible for any Bevy project:
- Made with Bevy UI (not egui or any other 3rd-party UI solution)
- Easy to set up (see
simple
example) - Modular! You decide what info you want to display!
- Choose any combination of predefined entries
(see
specific_entries
example):- Framerate (FPS), Frame Time, Frame Count, ECS Entity Count, CPU Usage, RAM Usage, Wall Clock, Running Time, Fixed Time Step, Fixed Overstep, Cursor Position, Window Resolution, Window Scale Factor, Window Mode, Present Mode
- Implement your own custom entries to display anything you like!
- (see
custom_minimal
andcustom
examples)
- (see
- Choose any combination of predefined entries
(see
- Customizable appearance/styling (see
settings
,fps_minimalist
examples) - Support for highlighting values using a custom font or color!
- Allows you to quickly notice if something demands your attention.
Spawning a Perf UI can be as simple as:
commands.spawn(PerfUiCompleteBundle::default());
If you want to create a Perf UI with specific entries of your choice,
just spawn an entity with PerfUiRoot
+ your desired entries, instead
of using this bundle.
commands.spawn((
PerfUiRoot::default(),
PerfUiEntryFPS::default(),
PerfUiEntryClock::default(),
// ...
));
If you want to customize the appearance, set the various fields in each of the
structs, instead of using default()
.
If you want to implement your own custom entry, create a component type
to represent your entry (you can use it to store any settings),
implement PerfUiEntry
for it, and register it using
app.add_perf_ui_entry_type::<T>()
.
Modules§
- Perf UI Entries based on Bevy Diagnostics
- Prelude of common types for users of the library
- Perf UI Entries for displaying the current time.
- Helper functions
- Perf UI Entries for info about application windows.
Structs§
- Bundle for a Perf UI with all entry types provided by
iyes_perf_ui
. - The Bevy Plugin
- Component to configure a Perf UI instance.
Enums§
- Which corner of the screen to display the Perf UI at?
- System Set to allow you to order things relative to our systems.
Traits§
- Extension trait for adding new types of Perf UI Entries.
- Trait for components representing entries (rows) in the Perf UI.
Functions§
- System that updates the values of Perf UI entries of a given type